package com.example.demo.controller;

import com.example.demo.http.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class IndexController {


    @RequestMapping("/test/{id}")
    public Result<String> sayNumber(HttpServletRequest request, @PathVariable Integer id){

      int i=100/id;

      return Result.createSuccesful(String.valueOf(i));



    }
}
